package com.xd.core.finance.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 服务费消耗明细
 * </p>
 *
 * @author ZX
 * @since 2025-03-18
 */
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ConsumeDetail对象", description="服务费消耗明细")
@ExcelIgnoreUnannotated
public class ConsumeDetail implements Serializable {

    private static final long serialVersionUID = 1L;


    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "消耗时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    @ExcelProperty(value = "消耗时间")
    private Date createTime;

    @ApiModelProperty(value = "消耗金额")
    @ExcelProperty(value = "消耗服务费金额")
    private BigDecimal cost;

    @ApiModelProperty(value = "交易金额")
    @ExcelProperty(value = "交易金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "收费类型 0:产品通道费 1:单笔放款服务费 2:入金服务费 3:公证书服务费 4:公证执行书服务费 5:单笔合同签约服务费 6:回款服务费 7:提现服务费")
    @ExcelProperty(value = "收费类型")
    private String type;

    @ApiModelProperty(value = "收费方式(1--比例,2--固定费率)")
    @ExcelProperty(value = "收费方式")
    private String payType;

    @ApiModelProperty(value = "费率配置")
    @ExcelProperty(value = "费率配置")
    private String rateConfig;

    @ApiModelProperty(value = "债权方机构名称")
    @ExcelProperty(value = "债权方机构名称")
    @TableField(exist = false)
    private String companyName;

    @ApiModelProperty(value = "公司id")
    @ExcelIgnore
    private Integer companyId;

    @ApiModelProperty(value = "交易类型(0--放款,1--回款，2--入金，3--提现)")
    @ExcelIgnore
    private Integer transactionType;

    @ApiModelProperty(value = "交易类型((0--放款,1--回款，2--入金 ，3--提现)")
    @TableField(exist = false)
    @ExcelProperty(value = "交易类型")
    private String transactionTypeRemark;

    @ApiModelProperty(value = "交易订单号")
    @ExcelProperty(value = "借款订单编号")
    private String orderNo;


}
